<?php

namespace BXTR\UserBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Role
 */
class Role
{
   /**
     * Constructor
     */
    public function __construct()
    {
    }

    public function __toString()
    {
        return $this->label;
    }

    /**
     * @var string
     */
    private $role;

    /**
     * @var string
     */
    private $label;

    /**
     * @var \Doctrine\Common\Collections\Collection
     */
    private $users;

    /**
     * Set role
     *
     * @param string $role
     * @return Role
     */
    public function setRole($role)
    {
        $this->role = $role;

        return $this;
    }

    /**
     * Get role
     *
     * @return string 
     */
    public function getRole()
    {
        return $this->role;
    }

    /**
     * Set label
     *
     * @param string $label
     * @return Role
     */
    public function setLabel($label)
    {
        $this->label = $label;

        return $this;
    }

    /**
     * Get label
     *
     * @return string 
     */
    public function getLabel()
    {
        return $this->label;
    }

    /**
     * Add users
     *
     * @param \BXTR\UserBundle\Entity\User $users
     * @return Role
     */
    public function addUser(\BXTR\UserBundle\Entity\User $users)
    {
        $this->users[] = $users;

        return $this;
    }

    /**
     * Remove users
     *
     * @param \BXTR\UserBundle\Entity\User $users
     */
    public function removeUser(\BXTR\UserBundle\Entity\User $users)
    {
        $this->users->removeElement($users);
    }

    /**
     * Get users
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getUsers()
    {
        return $this->users;
    }
}
